package com.yingsheng.bi.hks.web.controller;

import com.yingsheng.bi.hks.dto.employee.ResumeAddReq;
import com.yingsheng.bi.hks.dto.employee.ResumeAddRes;
import com.yingsheng.bi.hks.dto.employee.ResumeQryReq;
import com.yingsheng.bi.hks.dto.employee.ResumeQryRes;
import com.yingsheng.bi.hks.feign.client.EmployeeFeignClient;
import com.yingsheng.bi.hks.service.employee.EmployeeMgmtService;
import com.yingsheng.bi.hks.template.annotation.Template;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

/**
 * 员工信息管理
 *
 * @author 83686
 */
@RestController
public class EmployeeCtrl implements EmployeeFeignClient {

    @Autowired
    private EmployeeMgmtService employeeMgmtService;

    @Template(name = "accessTransTemplate")
    @Override
    public ResumeAddRes add(@Validated ResumeAddReq req) {
        return employeeMgmtService.add(req);
    }

    @Template(name = "accessQueryTemplate")
    @Override
    public ResumeQryRes qry(@Validated ResumeQryReq req) {
        return employeeMgmtService.qry(req);
    }
}
